import math

from ship_envs.core.polygon_model import PolygonModel


class StarModel(PolygonModel):
    def __init__(self, x=0.0, y=0.0, R=0.1, r=0.05):
        pts = [
            (math.cos(math.radians(90)) * R, math.sin(math.radians(90)) * R),
            (math.cos(math.radians(126)) * r, math.sin(math.radians(126)) * r),
            (math.cos(math.radians(162)) * R, math.sin(math.radians(162)) * R),
            (math.cos(math.radians(198)) * r, math.sin(math.radians(198)) * r),
            (math.cos(math.radians(234)) * R, math.sin(math.radians(234)) * R),
            (math.cos(math.radians(270)) * r, math.sin(math.radians(270)) * r),
            (math.cos(math.radians(306)) * R, math.sin(math.radians(306)) * R),
            (math.cos(math.radians(342)) * r, math.sin(math.radians(342)) * r),
            (math.cos(math.radians(18)) * R, math.sin(math.radians(18)) * R),
            (math.cos(math.radians(54)) * r, math.sin(math.radians(54)) * r),
        ]
        super(StarModel, self).__init__(x, y, pts)
